/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="push_message")
public class PushMessage implements Serializable {
	public PushMessage() {
	}
	
	private int id;
	
	private String title;
	
	private String content;
	
	private String url;
	
	private Byte state;
	
	private java.util.Date time;
	
	/**
	 * 主键
	 */
	public void setId(int value) {
		this.id = value;
	}
	
	/**
	 * 主键
	 */
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_PUSHMESSAGE_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_PUSHMESSAGE_ID_GENERATOR", strategy="identity")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	public void setTitle(String value) {
		this.title = value;
	}
	
	@Column(name="title", nullable=true, length=255)	
	public String getTitle() {
		return title;
	}
	
	public void setContent(String value) {
		this.content = value;
	}
	
	@Column(name="content", nullable=true, length=255)	
	public String getContent() {
		return content;
	}
	
	public void setUrl(String value) {
		this.url = value;
	}
	
	@Column(name="url", nullable=true, length=255)	
	public String getUrl() {
		return url;
	}
	
	/**
	 * 状态：0未发送，1已发送
	 */
	public void setState(byte value) {
		setState(new Byte(value));
	}
	
	/**
	 * 状态：0未发送，1已发送
	 */
	public void setState(Byte value) {
		this.state = value;
	}
	
	/**
	 * 状态：0未发送，1已发送
	 */
	@Column(name="state", nullable=true)	
	public Byte getState() {
		return state;
	}
	
	public void setTime(java.util.Date value) {
		this.time = value;
	}
	
	@Column(name="time", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getTime() {
		return time;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("PushMessage[ ");
			sb.append("Id=").append(getId()).append(" ");
			sb.append("Title=").append(getTitle()).append(" ");
			sb.append("Content=").append(getContent()).append(" ");
			sb.append("Url=").append(getUrl()).append(" ");
			sb.append("State=").append(getState()).append(" ");
			sb.append("Time=").append(getTime()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
